package cn.kgc.springcloud.sentinel.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: mosin
 * @version: v1.0  2022/8/22
 */
@RestController
@RequestMapping("sentinel")
public class SentinelController {
    private static final Logger logger = LoggerFactory.getLogger(SentinelController.class);

    @RequestMapping("/t1")
    public String test1(){
        logger.info("sentinel controller ok");
        return "sentinel controller ok";
    }


    @RequestMapping("/t2")
    public String test2(){
        throw  new RuntimeException("服务异常");
        //logger.info("sentinel controller ok");
        
        //return "sentinel2 controller ok";
    }

}
